From ffe1a45432f2ec6ddd3638dfebdab13eea998b3a Mon Sep 17 00:00:00 2001 From: "tsteven4@gmail.com" Date: Sun, 13 Apr 2014 13:26:17 +0000 Subject: [PATCH] fix bugs in addhms. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4808 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/csv_util.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/csv_util.cc b/gpsbabel/csv_util.cc index df44a5cc9..c597efa1f 100644 --- a/gpsbabel/csv_util.cc +++ b/gpsbabel/csv_util.cc @@ -868,13 +868,13 @@ addhms(const char* s, const char* format) int ac; ampm = (char*) xmalloc(strlen(s) + 1); - ac = sscanf(s, format, &hour, &min, &sec, &m); + ac = sscanf(s, format, &hour, &min, &sec, ampm); /* If no time format in arg string, assume AM */ if (ac < 4) { ampm[0] = 0; } if (ac) { - tt = ((tolower(ampm[0])=='P')?43200:0)+3600*hour+60*min+sec; + tt = ((tolower(ampm[0])=='p')?43200:0)+3600*hour+60*min+sec; } xfree(ampm); -- 2.30.2